FROM nginx:stable
ENV ACTIVE_ENV=
ENV TZ=Asia/Shanghai
RUN cp -f /usr/share/zoneinfo/${TZ} /etc/localtime && echo ${TZ} > /etc/timezone
RUN rm -rf /usr/share/nginx/html
COPY dist /usr/share/nginx/html
COPY docker/k8s/nginx.test.conf /etc/nginx/conf.d/
COPY docker/k8s/nginx.prod.conf /etc/nginx/conf.d/
COPY docker/k8s/mime.types /etc/nginx/conf.d/
ENTRYPOINT nginx -g 'daemon off;' -c /etc/nginx/conf.d/nginx.${ACTIVE_ENV}.conf
EXPOSE 80
